package bookticket.crm.recharge.dao;

import java.util.List;
import java.util.Map;

import bookticket.crm.recharge.entity.RechargeEntity;
import bookticket.crm.user.entity.UserEntity;


public interface RechargeDao {
	
	/**
	 * 向wxq_recharge_t表中增加数据
	 * @param entity
	 * @return
	 */
	int add(RechargeEntity entity);
	
	List<RechargeEntity> findAll(Map<String, Object> pageMap);

	int getTotalCounter(String phone);
	
	int updateUserByPhone(UserEntity userEntity);
	
	UserEntity findUserByPhone(String phone);
	
	/**
	 * 根据phone查找用户的总的充值金额
	 * @param phone
	 * @return
	 */
	int findTotalRechargeAmount(String phone);
	
	/**
	 * 查找用户充值总金额
	 * @return
	 */
	int findUserTotalRecharge();
}
